package cn.baiweigang.uu.service.strategy;

import cn.baiweigang.uu.db.dataobj.StockInfoDo;
import cn.baiweigang.uu.enums.ExtKeyEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@Slf4j
/**
 * 排名变动率 值越大变动越大
 */
public class StrategyPMChangeService extends StrategyBaseService {

    public boolean isHit(StockInfoDo stockInfoDo) {
        //排除ST票
        if (isST(stockInfoDo)) {
            return false;
        }

        //东方财富排名1000以内
        if (stockInfoDo.getPm() > 1000) {
            return false;
        }

        //排名变化率要大于1
        if (compareTo(stockInfoDo, "20", ExtKeyEnum.CHANGE1_PM) > 0) {
            return false;
        }
        return true;
    }


}
